package com.fqgj.xjd.user.client.enums;

/**
 * Aadhaar校验
 *
 * @author liuming
 * Created on 下午1:26 2018/8/31.
 */
public enum AadhaarStatusEnum {
    INIT(-1, "init"),
    CHECK_FAIL(0, "check fail"),
    CHECK_SUCCESS(1, "check success"),
    RE_UPLOAD(2, "re-upload");

    int status;
    String desc;

    AadhaarStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public AadhaarStatusEnum setStatus(int status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public AadhaarStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static AadhaarStatusEnum getEnumByStatus(Integer status) {
        AadhaarStatusEnum aadhaarStatusEnum = null;
        for (AadhaarStatusEnum enumObj : AadhaarStatusEnum.values()) {
            if (enumObj.getStatus() == status) {
                aadhaarStatusEnum = enumObj;
                break;
            }
        }
        return aadhaarStatusEnum;
    }
}
